package racetrack

class AdminFilters {

    def filters = {
        adminOnly(controller:'*', action:'create|edit|update|delete|save') {
            before = {
				if(!session?.user?.isAdmin){
					flash.message = "Sorry, admin only"
					redirect(controller:"race")
					return false
				}
            }
           
        }
    }
}
